﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using ZLDC.Common.Estate;
namespace ZLDC.Estate.Quantify
{
    public partial class lp_Addition_left : System.Web.UI.Page
    {
        public StringBuilder sb = new StringBuilder();
        public string type;
        public string time;
        public string deptid;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                type = _Request.GetString("type", "0");
                time = _Request.GetString("time", "0");
                deptid = _Request.GetString("deptid", "0");
                txtTIME.Text = DateTime.Now.ToString("yyyy-MM-dd");
                if (type == "2")
                {
                    div.Style["display"] = "none";
                }
                if (txtTIME.Text != "")
                {
                    GetDEPT(type);
                }
            }
        }

        protected void GetDEPT(string type)
        {
            if (type == "2")
            {
                sb.Append(ZLDC.Topo.BLL.Estate.lp_Addition_left.GetDEPT(deptid, Convert.ToDateTime(time)));
            }
            else
            {
                sb.Append(ZLDC.Topo.BLL.Estate.lp_Addition_left.GetDEPT(_Utility.GetInfoBySession().m_sDeptID, Convert.ToDateTime(txtTIME.Text)));
            }
        }

       

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (txtTIME.Text != "")
            {
                GetDEPT(type);
            }
        }
   

      
    }
}
